package md.lanjing.com.module_home.ui.activity;

import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

import com.lxh.baselibray.base.XActivity;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import md.lanjing.com.module_home.R;
import md.lanjing.com.module_home.R2;

import com.lxh.baselibray.view.SignInView;


/**
 * 我的等级
 */
public class MyLevelActivity extends XActivity {
    public static final String LEVEL  ="level";
    @BindView(R2.id.iv_level_pic)
    ImageView ivLevelPic;
    @BindView(R2.id.tv_level_text)
    TextView tvLevelText;
    @BindView(R2.id.sign_in_view)
    SignInView signInView;

    @Override
    public void initData(Bundle savedInstanceState) {
        int level = getIntent().getIntExtra(LEVEL, -1);
        String levelText=null;
        int resId=-1;
        switch (level) {
            case 0:
                levelText = "一般投资人";
                resId= R.drawable.icon_level_one;
                break;
            case 1:
                levelText = "节能经纪人";
                resId=R.drawable.icon_level_two;
                break;
            case 2:
                levelText = "绿能源经纪人";
                resId=R.drawable.icon_level_three;
                break;
            case 3:
                levelText = "赋能源经纪人";
                resId=R.drawable.icon_level_four;
                break;
            case 4:
                levelText = "超能源经纪人";
                resId=R.drawable.icon_level_five;
                break;
            case 5:
                levelText = "运营中心";
                resId=R.drawable.icon_level_six;
                break;
        }
        tvLevelText.setText(levelText);
        ivLevelPic.setImageResource(resId);

        List<String> viewData = new ArrayList<>();
      /*  viewData.add("一般投资人");
        viewData.add("节能经纪人");
        viewData.add("绿能源经纪人");
        viewData.add("赋能源经纪人");
        viewData.add("超能源经纪人");
        viewData.add("运营中心");*/
        for (int i = 0; i < 6; i++) {
            viewData.add("");
        }
        signInView.setSignInData(viewData);
        signInView.setSignNumber(level);

    }

    @Override
    public int getLayoutId() {
        return R.layout.activity_my_level;
    }

}
